<?php /// simulateur

 add_action('admin_init','ref_meta_init');  // mbo_meta_init   mbo_simulateur_meta_init
    function ref_meta_init()
    {
        $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;
        $template_file = get_post_meta($post_id,'_wp_page_template',TRUE);
         // check for a template type
    	if ($template_file == 'page-ref.php')
    	{
    	   remove_post_type_support('page', 'editor');
           remove_post_type_support('page', 'thumbnail');
           remove_post_type_support('page', 'excerpt');
           remove_post_type_support('page', 'trackbacks');
           remove_post_type_support('page', 'comments');
        }

    }
?>